/// 创建人： Created by zhaoin
/// 创建时间：Created by  on 2020/7/23.
///
/// 创建人： Created by zhaoin
/// 创建时间：Created by  on 2020/9/25.
///
/// gongzhonghao biglead
/// https://study.163.com/instructor/1021406098.htm
/// https://blog.csdn.net/zl18603543572
/// https://www.toutiao.com/c/user/token/MS4wLjABAAAAYMrKikomuQJ4d-cPaeBqtAK2cQY697Pv9xIyyDhtwIM/

///lib/app/bean/bean_catalog.dart
class ProblemRuleModel {
  int id;
  String pageRuleName;

  /// 出题规则
  /// randomf 随机出题
  /// orderf  顺序出题
  /// randomTime 限时答题
  String orderRule = "randomf";

  ///限时时间
  int randomTime = 60;

  ProblemRuleModel.fromJson(Map<String, dynamic> map) {
    this.id = map["id"];
    this.pageRuleName = map["pageRuleName"];
    this.orderRule = map["orderRule"] ?? "randomf";
    if (map["randomTime"] == null) {
      this.randomTime = 60 * 60;
    } else {
      this.randomTime = map["randomTime"];
    }
  }
}

class ExaminNewConfigItemEntity {
  /// on 打开切屏控制  ； off 关闭
  String openSwitchScreen = "off";

  /// 切屏控制的次数
  int switchScreenNumber = 5;

  /// 切屏控制的提示
  String switchScreenMessage;

  ExaminNewConfigItemEntity.fromJson(Map<String, dynamic> map) {
    this.openSwitchScreen = map["openSwitchScreen"] ?? "off";
    this.switchScreenNumber = map["switchScreenNumber"] ?? 5;
    this.switchScreenMessage = map["switchScreenMessage"] ??
        "当前只允许有${switchScreenNumber}次切屏机会，切屏机会使用完毕后将自动交卷";
  }
}
